
 <!DOCTYPE HTML>
<html >
<head>
  <meta charset="UTF-8">
  
    <title>学习配置部署Maven项目 | B3434lockchain</title>
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
    
    <meta name="author" content="b3434lockchain">
    

    
    <meta name="description" content="本周任务：    学习JavaFX开源项目     学习JavaFX12的Maven项目的部署     优化上周项目中HttpUtils代码    语言：JavaFX12   工具：Eclipse IDE  上周代码的优化简化HttpUtils类的Post方法，提高其可重用性 123456789101112131415161718192021222324252627282930313233343">
<meta name="keywords" content="苏佳鑫">
<meta property="og:type" content="article">
<meta property="og:title" content="学习配置部署Maven项目">
<meta property="og:url" content="http://b3434lockchain.gitee.io/2019/04/21/jiaxin/jiaxin2/index.html">
<meta property="og:site_name" content="B3434lockchain">
<meta property="og:description" content="本周任务：    学习JavaFX开源项目     学习JavaFX12的Maven项目的部署     优化上周项目中HttpUtils代码    语言：JavaFX12   工具：Eclipse IDE  上周代码的优化简化HttpUtils类的Post方法，提高其可重用性 123456789101112131415161718192021222324252627282930313233343">
<meta property="og:locale" content="default">
<meta property="og:image" content="https://upload-images.jianshu.io/upload_images/17501422-44f4926f6a43beac.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240">
<meta property="og:image" content="https://upload-images.jianshu.io/upload_images/17501422-23b11f3156270419.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240">
<meta property="og:updated_time" content="2019-04-22T16:00:46.207Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="学习配置部署Maven项目">
<meta name="twitter:description" content="本周任务：    学习JavaFX开源项目     学习JavaFX12的Maven项目的部署     优化上周项目中HttpUtils代码    语言：JavaFX12   工具：Eclipse IDE  上周代码的优化简化HttpUtils类的Post方法，提高其可重用性 123456789101112131415161718192021222324252627282930313233343">
<meta name="twitter:image" content="https://upload-images.jianshu.io/upload_images/17501422-44f4926f6a43beac.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240">

    
    <link rel="alternative" href="/atom.xml" title="B3434lockchain" type="application/atom+xml">
    
    
    <link rel="icon" href="/img/favicon.ico">
    
    
    <link rel="apple-touch-icon" href="/img/jacman.jpg">
    <link rel="apple-touch-icon-precomposed" href="/img/jacman.jpg">
    
    <link rel="stylesheet" href="/css/style.css">
</head>

  <body>
    <header>
      
<div>
		
			<div id="imglogo">
				<a href="/"><img src="/img/logo.png" alt="B3434lockchain" title="B3434lockchain"/></a>
			</div>
			
			<div id="textlogo">
				<h1 class="site-name"><a href="/" title="B3434lockchain">B3434lockchain</a></h1>
				<h2 class="blog-motto"></h2>
			</div>
			<div class="navbar"><a class="navbutton navmobile" href="#" title="Menu">
			</a></div>
			<nav class="animated">
				<ul>
					<ul>
					 
						<li><a href="/">Home</a></li>
					
						<li><a href="/archives">Archives</a></li>
					
						<li><a href="/about">About</a></li>
					
					<li>
 					
						<form class="search" action="https://www.baidu.com" target="_blank">
							<label>Search</label>
						<input name="s" type="hidden" value=  ><input type="text" name="q" size="30" placeholder="Search"><br>
						</form>
					
					</li>
				</ul>
			</nav>			
</div>
    </header>
    <div id="container">
      <div id="main" class="post" itemscope itemprop="blogPost">
  
	<article itemprop="articleBody"> 
		<header class="article-info clearfix">
  <h1 itemprop="name">
    
      <a href="/2019/04/21/jiaxin/jiaxin2/" title="学习配置部署Maven项目" itemprop="url">学习配置部署Maven项目</a>
  </h1>
  <p class="article-author">By
       
		<a href="/about" title="b3434lockchain" target="_blank" itemprop="author">b3434lockchain</a>
		
  <p class="article-time">
    <time datetime="2019-04-21T03:00:00.000Z" itemprop="datePublished"> Published 2019-04-21</time>
    
  </p>
</header>
	<div class="article-content">
		
		<div id="toc" class="toc-article">
			<strong class="toc-title">Contents</strong>
		
			<ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#上周代码的优化"><span class="toc-number">1.</span> <span class="toc-text">上周代码的优化</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#构建JavaFX12的Maven项目"><span class="toc-number">2.</span> <span class="toc-text">构建JavaFX12的Maven项目</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#pom-xml配置"><span class="toc-number">2.1.</span> <span class="toc-text">pom.xml配置</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#App-java（模板代码）"><span class="toc-number">2.2.</span> <span class="toc-text">App.java（模板代码）</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#模板运行界面："><span class="toc-number">2.3.</span> <span class="toc-text">模板运行界面：</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#总结"><span class="toc-number">3.</span> <span class="toc-text">总结</span></a></li></ol>
		
		</div>
		
		<blockquote>
<p><strong>本周任务</strong>：</p>
</blockquote>
<blockquote>
<ul>
<li>学习JavaFX开源项目</li>
</ul>
</blockquote>
<blockquote>
<ul>
<li>学习JavaFX12的Maven项目的部署</li>
</ul>
</blockquote>
<blockquote>
<ul>
<li>优化上周项目中HttpUtils代码</li>
</ul>
</blockquote>
<blockquote>
<p><strong>语言</strong>：JavaFX12</p>
</blockquote>
<blockquote>
<p><strong>工具</strong>：Eclipse IDE</p>
</blockquote>
<h2 id="上周代码的优化"><a href="#上周代码的优化" class="headerlink" title="上周代码的优化"></a>上周代码的优化</h2><p>简化HttpUtils类的Post方法，提高其可重用性</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br><span class="line">78</span><br><span class="line">79</span><br><span class="line">80</span><br><span class="line">81</span><br><span class="line">82</span><br><span class="line">83</span><br><span class="line">84</span><br><span class="line">85</span><br><span class="line">86</span><br><span class="line">87</span><br><span class="line">88</span><br><span class="line">89</span><br><span class="line">90</span><br><span class="line">91</span><br><span class="line">92</span><br><span class="line">93</span><br><span class="line">94</span><br><span class="line">95</span><br><span class="line">96</span><br><span class="line">97</span><br><span class="line">98</span><br><span class="line">99</span><br><span class="line">100</span><br><span class="line">101</span><br><span class="line">102</span><br><span class="line">103</span><br><span class="line">104</span><br><span class="line">105</span><br><span class="line">106</span><br><span class="line">107</span><br><span class="line">108</span><br><span class="line">109</span><br><span class="line">110</span><br><span class="line">111</span><br><span class="line">112</span><br><span class="line">113</span><br><span class="line">114</span><br><span class="line">115</span><br><span class="line">116</span><br><span class="line">117</span><br><span class="line">118</span><br><span class="line">119</span><br><span class="line">120</span><br><span class="line">121</span><br><span class="line">122</span><br><span class="line">123</span><br><span class="line">124</span><br><span class="line">125</span><br></pre></td><td class="code"><pre><span class="line">package Tool;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  import java.net.URI;</span><br><span class="line"></span><br><span class="line">  import org.apache.http.HttpEntity;</span><br><span class="line"></span><br><span class="line">  import org.apache.http.HttpResponse;</span><br><span class="line"></span><br><span class="line">  import org.apache.http.client.methods.HttpPost;</span><br><span class="line"></span><br><span class="line">  import org.apache.http.entity.StringEntity;</span><br><span class="line"></span><br><span class="line">  import org.apache.http.impl.client.CloseableHttpClient;</span><br><span class="line"></span><br><span class="line">  import org.apache.http.impl.client.HttpClients;</span><br><span class="line"></span><br><span class="line">  import org.apache.http.protocol.HTTP;</span><br><span class="line"></span><br><span class="line">  import org.apache.http.util.EntityUtils;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  public class HttpUtils &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  public static String PostMethod(String URI,String mes)</span><br><span class="line"></span><br><span class="line">  &#123;</span><br><span class="line"></span><br><span class="line">  try &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  CloseableHttpClient httpClient = HttpClients.createDefault();</span><br><span class="line"></span><br><span class="line">  URI uri;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  uri = new URI(URI);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  HttpPost httpPost=new HttpPost(uri);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  httpPost.addHeader(HTTP.CONTENT_TYPE, &quot;application/json&quot;);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">              StringEntity entity;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  entity=new StringEntity(mes,&quot;utf-8&quot;);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  entity.setContentType(&quot;application/json&quot;);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  httpPost.setEntity(entity);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  HttpResponse response;</span><br><span class="line"></span><br><span class="line">  response = httpClient.execute(httpPost);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  HttpEntity entitys = response.getEntity();</span><br><span class="line"></span><br><span class="line">  String result=EntityUtils.toString(entitys);</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  return result;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  &#125; catch (Exception e) &#123;</span><br><span class="line"></span><br><span class="line">  // TODO Auto-generated catch block</span><br><span class="line"></span><br><span class="line">  e.printStackTrace();</span><br><span class="line"></span><br><span class="line">  &#125;finally &#123;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  return null;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  &#125;</span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"></span><br><span class="line">  &#125;</span><br></pre></td></tr></table></figure>
<h2 id="构建JavaFX12的Maven项目"><a href="#构建JavaFX12的Maven项目" class="headerlink" title="构建JavaFX12的Maven项目"></a>构建JavaFX12的Maven项目</h2><p><img src="https://upload-images.jianshu.io/upload_images/17501422-44f4926f6a43beac.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="项目"></p>
<h3 id="pom-xml配置"><a href="#pom-xml配置" class="headerlink" title="pom.xml配置"></a>pom.xml配置</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br><span class="line">52</span><br><span class="line">53</span><br><span class="line">54</span><br><span class="line">55</span><br><span class="line">56</span><br><span class="line">57</span><br><span class="line">58</span><br><span class="line">59</span><br><span class="line">60</span><br><span class="line">61</span><br><span class="line">62</span><br><span class="line">63</span><br><span class="line">64</span><br><span class="line">65</span><br><span class="line">66</span><br><span class="line">67</span><br><span class="line">68</span><br><span class="line">69</span><br><span class="line">70</span><br><span class="line">71</span><br><span class="line">72</span><br><span class="line">73</span><br><span class="line">74</span><br><span class="line">75</span><br><span class="line">76</span><br><span class="line">77</span><br></pre></td><td class="code"><pre><span class="line">&lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span><br><span class="line"></span><br><span class="line">      xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd&quot;&gt;</span><br><span class="line"></span><br><span class="line">        &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;</span><br><span class="line"></span><br><span class="line">        &lt;groupId&gt;org.openjfx&lt;/groupId&gt;</span><br><span class="line"></span><br><span class="line">        &lt;artifactId&gt;hellofx&lt;/artifactId&gt;</span><br><span class="line"></span><br><span class="line">        &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;</span><br><span class="line"></span><br><span class="line">        &lt;properties&gt;</span><br><span class="line"></span><br><span class="line">            &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;</span><br><span class="line"></span><br><span class="line">            &lt;maven.compiler.source&gt;11&lt;/maven.compiler.source&gt;</span><br><span class="line"></span><br><span class="line">            &lt;maven.compiler.target&gt;11&lt;/maven.compiler.target&gt;</span><br><span class="line"></span><br><span class="line">        &lt;/properties&gt;</span><br><span class="line"></span><br><span class="line">        &lt;dependencies&gt;</span><br><span class="line"></span><br><span class="line">            &lt;dependency&gt;</span><br><span class="line"></span><br><span class="line">                &lt;groupId&gt;org.openjfx&lt;/groupId&gt;</span><br><span class="line"></span><br><span class="line">                &lt;artifactId&gt;javafx-controls&lt;/artifactId&gt;</span><br><span class="line"></span><br><span class="line">                &lt;version&gt;11.0.2&lt;/version&gt;</span><br><span class="line"></span><br><span class="line">            &lt;/dependency&gt;</span><br><span class="line"></span><br><span class="line">        &lt;/dependencies&gt;</span><br><span class="line"></span><br><span class="line">        &lt;build&gt;</span><br><span class="line"></span><br><span class="line">            &lt;plugins&gt;</span><br><span class="line"></span><br><span class="line">                &lt;plugin&gt;</span><br><span class="line"></span><br><span class="line">                    &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;</span><br><span class="line"></span><br><span class="line">                    &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;</span><br><span class="line"></span><br><span class="line">                    &lt;version&gt;3.8.0&lt;/version&gt;</span><br><span class="line"></span><br><span class="line">                    &lt;configuration&gt;</span><br><span class="line"></span><br><span class="line">                        &lt;release&gt;11&lt;/release&gt;</span><br><span class="line"></span><br><span class="line">                    &lt;/configuration&gt;</span><br><span class="line"></span><br><span class="line">                &lt;/plugin&gt;</span><br><span class="line"></span><br><span class="line">                &lt;plugin&gt;</span><br><span class="line"></span><br><span class="line">                    &lt;groupId&gt;org.openjfx&lt;/groupId&gt;</span><br><span class="line"></span><br><span class="line">                    &lt;artifactId&gt;javafx-maven-plugin&lt;/artifactId&gt;</span><br><span class="line"></span><br><span class="line">                    &lt;version&gt;0.0.1&lt;/version&gt;</span><br><span class="line"></span><br><span class="line">                    &lt;configuration&gt;</span><br><span class="line"></span><br><span class="line">                        &lt;mainClass&gt;org.openjfx.hellofx.App&lt;/mainClass&gt;</span><br><span class="line"></span><br><span class="line">                    &lt;/configuration&gt;</span><br><span class="line"></span><br><span class="line">                &lt;/plugin&gt;</span><br><span class="line"></span><br><span class="line">            &lt;/plugins&gt;</span><br><span class="line"></span><br><span class="line">        &lt;/build&gt;</span><br><span class="line"></span><br><span class="line">    &lt;/project&gt;</span><br></pre></td></tr></table></figure>
<h3 id="App-java（模板代码）"><a href="#App-java（模板代码）" class="headerlink" title="App.java（模板代码）"></a>App.java（模板代码）</h3><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br></pre></td><td class="code"><pre><span class="line">package org.openjfx.hellofx;</span><br><span class="line"></span><br><span class="line">import javafx.application.Application;</span><br><span class="line"></span><br><span class="line">import javafx.scene.Scene;</span><br><span class="line"></span><br><span class="line">import javafx.scene.control.Label;</span><br><span class="line"></span><br><span class="line">import javafx.scene.layout.StackPane;</span><br><span class="line"></span><br><span class="line">import javafx.stage.Stage;</span><br><span class="line"></span><br><span class="line">/**</span><br><span class="line"></span><br><span class="line">* JavaFX App</span><br><span class="line"></span><br><span class="line">*/</span><br><span class="line"></span><br><span class="line">public class App extends Application &#123;</span><br><span class="line"></span><br><span class="line">    @Override</span><br><span class="line"></span><br><span class="line">    public void start(Stage stage) &#123;</span><br><span class="line"></span><br><span class="line">        String javaVersion = SystemInfo.javaVersion();</span><br><span class="line"></span><br><span class="line">        String javafxVersion = SystemInfo.javafxVersion();</span><br><span class="line"></span><br><span class="line">        Label label = new Label(&quot;Hello, JavaFX &quot; + javafxVersion + &quot;, running on Java &quot; + javaVersion + &quot;.&quot;);</span><br><span class="line"></span><br><span class="line">        Scene scene = new Scene(new StackPane(label), 640, 480);</span><br><span class="line"></span><br><span class="line">        stage.setScene(scene);</span><br><span class="line"></span><br><span class="line">        stage.show();</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">    public static void main(String[] args) &#123;</span><br><span class="line"></span><br><span class="line">        launch();</span><br><span class="line"></span><br><span class="line">    &#125;</span><br><span class="line"></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h3 id="模板运行界面："><a href="#模板运行界面：" class="headerlink" title="模板运行界面："></a>模板运行界面：</h3><p><img src="https://upload-images.jianshu.io/upload_images/17501422-23b11f3156270419.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240" alt="界面"></p>
<p><a href="https://openjfx.io/openjfx-docs/#maven" target="_blank" rel="noopener">学习参考</a></p>
<h2 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h2><p>学习构建Maven项目可使项目更加轻量、降低移植难度，是接下来步入开发的必备技能</p>
<p>下周将围绕本区块链项目进行需求分析，同时将桌面应用的客户端界面雏形设计好。</p>
  
	</div>
		<footer class="article-footer clearfix">
<div class="article-catetags">


  <div class="article-tags">
  
  <span></span> <a href="/tags/苏佳鑫/">苏佳鑫</a>
  </div>

</div>



	<div class="article-share" id="share">
	
	  <div data-url="http://b3434lockchain.gitee.io/2019/04/21/jiaxin/jiaxin2/" data-title="学习配置部署Maven项目 | B3434lockchain" data-tsina="" class="share clearfix">
	  </div>
	
	</div>


</footer>

   	       
	</article>
	
<nav class="article-nav clearfix">
 
 <div class="prev" >
 <a href="/2019/04/22/tanjunxi/tanjunxi7/" title="周报">
  <strong>上一篇：</strong><br/>
  <span>
  周报</span>
</a>
</div>


<div class="next">
<a href="/2019/04/15/tanjunxi/tanjunxi6/"  title="谭俊熙_mini桌面应用后端">
 <strong>下一篇：</strong><br/> 
 <span>谭俊熙_mini桌面应用后端
</span>
</a>
</div>

</nav>

	



</div>  
      <div class="openaside"><a class="navbutton" href="#" title="Show Sidebar"></a></div>

  <div id="toc" class="toc-aside">
  <strong class="toc-title">Contents</strong>
 
 <ol class="toc"><li class="toc-item toc-level-2"><a class="toc-link" href="#上周代码的优化"><span class="toc-number">1.</span> <span class="toc-text">上周代码的优化</span></a></li><li class="toc-item toc-level-2"><a class="toc-link" href="#构建JavaFX12的Maven项目"><span class="toc-number">2.</span> <span class="toc-text">构建JavaFX12的Maven项目</span></a><ol class="toc-child"><li class="toc-item toc-level-3"><a class="toc-link" href="#pom-xml配置"><span class="toc-number">2.1.</span> <span class="toc-text">pom.xml配置</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#App-java（模板代码）"><span class="toc-number">2.2.</span> <span class="toc-text">App.java（模板代码）</span></a></li><li class="toc-item toc-level-3"><a class="toc-link" href="#模板运行界面："><span class="toc-number">2.3.</span> <span class="toc-text">模板运行界面：</span></a></li></ol></li><li class="toc-item toc-level-2"><a class="toc-link" href="#总结"><span class="toc-number">3.</span> <span class="toc-text">总结</span></a></li></ol>
 
  </div>

<div id="asidepart">
<div class="closeaside"><a class="closebutton" href="#" title="Hide Sidebar"></a></div>
<aside class="clearfix">

  

  
<div class="tagslist">
	<p class="asidetitle">Tags</p>
		<ul class="clearfix">
		
			
				<li><a href="/tags/周报/" title="周报">周报<sup>23</sup></a></li>
			
		
			
				<li><a href="/tags/谭俊熙/" title="谭俊熙">谭俊熙<sup>11</sup></a></li>
			
		
			
				<li><a href="/tags/苏思捷/" title="苏思捷">苏思捷<sup>5</sup></a></li>
			
		
			
				<li><a href="/tags/学习报告/" title="学习报告">学习报告<sup>5</sup></a></li>
			
		
			
				<li><a href="/tags/卢家豪/" title="卢家豪">卢家豪<sup>5</sup></a></li>
			
		
			
				<li><a href="/tags/报告/" title="报告">报告<sup>5</sup></a></li>
			
		
			
				<li><a href="/tags/苏佳鑫/" title="苏佳鑫">苏佳鑫<sup>4</sup></a></li>
			
		
			
				<li><a href="/tags/冯华文/" title="冯华文">冯华文<sup>4</sup></a></li>
			
		
			
				<li><a href="/tags/周报反馈/" title="周报反馈">周报反馈<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/吴朝捷/" title="吴朝捷">吴朝捷<sup>2</sup></a></li>
			
		
			
				<li><a href="/tags/黎宁/" title="黎宁">黎宁<sup>1</sup></a></li>
			
		
			
				<li><a href="/tags/笔记/" title="笔记">笔记<sup>1</sup></a></li>
			
		
		</ul>
</div>


</aside>
</div>
    </div>
    <footer><div id="footer" >
	
	
	<div class="social-font" class="clearfix">
		
		
		
		
		
		
		
		
		
		
	</div>
			
		

		<p class="copyright">
		
		</p>
</div>
</footer>
    <script src="/js/jquery-2.0.3.min.js"></script>
<script src="/js/jquery.imagesloaded.min.js"></script>
<script src="/js/gallery.js"></script>
<script src="/js/jquery.qrcode-0.12.0.min.js"></script>

<script type="text/javascript">
$(document).ready(function(){ 
  $('.navbar').click(function(){
    $('header nav').toggleClass('shownav');
  });
  var myWidth = 0;
  function getSize(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
  };
  var m = $('#main'),
      a = $('#asidepart'),
      c = $('.closeaside'),
      o = $('.openaside');
  c.click(function(){
    a.addClass('fadeOut').css('display', 'none');
    o.css('display', 'block').addClass('fadeIn');
    m.addClass('moveMain');
  });
  o.click(function(){
    o.css('display', 'none').removeClass('beforeFadeIn');
    a.css('display', 'block').removeClass('fadeOut').addClass('fadeIn');      
    m.removeClass('moveMain');
  });
  $(window).scroll(function(){
    o.css("top",Math.max(80,260-$(this).scrollTop()));
  });
  
  $(window).resize(function(){
    getSize(); 
    if (myWidth >= 1024) {
      $('header nav').removeClass('shownav');
    }else{
      m.removeClass('moveMain');
      a.css('display', 'block').removeClass('fadeOut');
      o.css('display', 'none');
      
      $('#toc.toc-aside').css('display', 'none');
        
    }
  });
});
</script>

<script type="text/javascript">
$(document).ready(function(){ 
  var ai = $('.article-content>iframe'),
      ae = $('.article-content>embed'),
      t  = $('#toc'),
      ta = $('#toc.toc-aside'),
      o  = $('.openaside'),
      c  = $('.closeaside');
  if(ai.length>0){
    ai.wrap('<div class="video-container" />');
  };
  if(ae.length>0){
   ae.wrap('<div class="video-container" />');
  };
  c.click(function(){
    ta.css('display', 'block').addClass('fadeIn');
  });
  o.click(function(){
    ta.css('display', 'none');
  });
  $(window).scroll(function(){
    ta.css("top",Math.max(140,320-$(this).scrollTop()));
  });
});
</script>


<script type="text/javascript">
$(document).ready(function(){ 
  var $this = $('.share'),
      url = $this.attr('data-url'),
      encodedUrl = encodeURIComponent(url),
      title = $this.attr('data-title'),
      tsina = $this.attr('data-tsina'),
      description = $this.attr('description');
  var html = [
  '<div class="hoverqrcode clearfix"></div>',
  '<a class="overlay" id="qrcode"></a>',
  '<a href="https://www.facebook.com/sharer.php?u=' + encodedUrl + '" class="article-share-facebook" target="_blank" title="Facebook"></a>',
  '<a href="https://twitter.com/intent/tweet?url=' + encodedUrl + '" class="article-share-twitter" target="_blank" title="Twitter"></a>',
  '<a href="#qrcode" class="article-share-qrcode" title="微信"></a>',
  '<a href="http://widget.renren.com/dialog/share?resourceUrl=' + encodedUrl + '&srcUrl=' + encodedUrl + '&title=' + title +'" class="article-share-renren" target="_blank" title="人人"></a>',
  '<a href="http://service.weibo.com/share/share.php?title='+title+'&url='+encodedUrl +'&ralateUid='+ tsina +'&searchPic=true&style=number' +'" class="article-share-weibo" target="_blank" title="微博"></a>',
  '<span title="Share to"></span>'
  ].join('');
  $this.append(html);

  $('.hoverqrcode').hide();

  var myWidth = 0;
  function updatehoverqrcode(){
    if( typeof( window.innerWidth ) == 'number' ) {
      myWidth = window.innerWidth;
    } else if( document.documentElement && document.documentElement.clientWidth) {
      myWidth = document.documentElement.clientWidth;
    };
    var qrsize = myWidth > 1024 ? 200:100;
    var options = {render: 'image', size: qrsize, fill: '#2ca6cb', text: url, radius: 0.5, quiet: 1};
    var p = $('.article-share-qrcode').position();
    $('.hoverqrcode').empty().css('width', qrsize).css('height', qrsize)
                          .css('left', p.left-qrsize/2+20).css('top', p.top-qrsize-10)
                          .qrcode(options);
  };
  $(window).resize(function(){
    $('.hoverqrcode').hide();
  });
  $('.article-share-qrcode').click(function(){
    updatehoverqrcode();
    $('.hoverqrcode').toggle();
  });
  $('.article-share-qrcode').hover(function(){}, function(){
      $('.hoverqrcode').hide();
  });
});   
</script>











<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" media="screen" type="text/css">
<script src="/fancybox/jquery.fancybox.pack.js"></script>
<script type="text/javascript">
$(document).ready(function(){ 
  $('.article-content').each(function(i){
    $(this).find('img').each(function(){
      if ($(this).parent().hasClass('fancybox')) return;
      var alt = this.alt;
      if (alt) $(this).after('<span class="caption">' + alt + '</span>');
      $(this).wrap('<a href="' + this.src + '" title="' + alt + '" class="fancybox"></a>');
    });
    $(this).find('.fancybox').each(function(){
      $(this).attr('rel', 'article' + i);
    });
  });
  if($.fancybox){
    $('.fancybox').fancybox();
  }
}); 
</script>



<!-- Analytics Begin -->





<!-- Analytics End -->

<!-- Totop Begin -->

	<div id="totop">
	<a title="Back to Top"><img src="/img/scrollup.png"/></a>
	</div>
	<script src="/js/totop.js"></script>

<!-- Totop End -->

<!-- MathJax Begin -->
<!-- mathjax config similar to math.stackexchange -->


<!-- MathJax End -->

<!-- Tiny_search Begin -->

<!-- Tiny_search End -->

  </body>
</html>
